package com.lct.d10_interface_demo;

import java.util.ArrayList;

public class Test{
	public static void main(String[] args) {
		//目标：班级学生管理系统
		//1.每个学生是一个对象，所以先定义学生类，用于创建学生对象，封装学生数据
		//2.定义接口，classDate

		//3.定义实现类，来分别实现，以便解耦合
		ArrayList<Student> students = new ArrayList<>();
		students.add(new Student("LCT1",'男', 80));
		students.add(new Student("LCT2",'男', 95));
		students.add(new Student("LCT3",'男', 75));
		students.add(new Student("LCT4",'男', 100));
		students.add(new Student("LCT5",'男', 100));
		students.add(new Student("LCT6",'男', 80));

		ClassData data = new ClassDataImpl2(students);
		data.printAllStudent();
		data.printAllStudentAverageScore();
	}
}
